<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>API测试</title>
</head>
<body>
    <script src="../jquery/jquery-3.6.0.min.js"></script>
    <script type="text/javascript">
        
        $(function() {
            var url = "https://v1.hitokoto.cn/?c=i";
            $.get(url,function(msg) {
                $("#text").html(msg);
                console.log(msg.hitokoto);
            },"json")
        })
       
        

    </script>

    <span id="text"></span>
</body>
</html>